5 7
0 1 3
1 2 3
2 3 3
0 2 2
1 3 1
1 4 1
4 2 1
